<template>
  <div id="view">
    <div id="view-1">
      <div class="thy-34">
        <span class="jk_span"
          ><div></div>
          编辑签约信息</span
        >
        <div class="view-2">
          <br />

          <div class="view-3">居民信息</div>

          <div class="thy-2">
            <!-- <span class="span-2">居民编号：<span class="span-3"> {{obj.id}}</span></span> -->
            <span class="span-40"
              >姓名<span class="xinghao">*</span>：<input
                id="input_name"
                type="text"
                style=""
                v-model="obj.record_name"
                readonly
            /></span>
            <span class="span-6"
              >身份证号<span class="xinghao">*</span>：<input
                type="text"
                style=""
                class="input_sfz"
                v-model="obj.record_card"
              />
            </span>
            <span class="span-6"
              >性别<span class="xinghao">*</span>：
              <select name="" class="sex_select" v-model="obj.sex" style="">
                <option value="请选择">请选择</option>
                <option value="男">男</option>
                <option value="女">女</option>
              </select>
            </span>
            <span class="span-age"
              >年龄<span class="xinghao">*</span>：<input
                class="input_sfz"
                type="text"
                style=""
                v-model="obj.age"
            /></span>

            <span class="span-6"
              >手机号码<span class="xinghao">*</span>：<input
                type="text"
                style=""
                class="input_sfz"
                v-model="obj.record_phone"
            /></span>
            <span class="span-address"
              >现居地<span class="xinghao">*</span>：<input
                type="text"
                style=""
                class="input_address"
                v-model="obj.present_address"
            /></span>

            <span class="span-5"
              >居民标签<span class="xinghao">*</span>：
              <select
                name=""
                class="sex_select2"
                v-model="obj.residentsof_label"
                style=""
              >
                <option value="">请选择</option>
                <option value="高血压">高血压</option>
                <option value="冠心病">冠心病</option>
                <option value="高血糖">高血糖</option>
              </select>
            </span>
          </div>
          <div class="thy-3">
            <div class="thy-man"><span class="span-1">家庭成员</span></div>
            <div class="thy-4">
              <div class="thy-5">
                <img src="u1693 (1).jpg" alt="" class="img-1" />
              </div>
              <span class="span-7">李清</span>
              <span class="span-8">58岁</span>
              <span class="span-9">关系：父母</span>
            </div>
            <div class="thy-4">
              <div class="thy-5">
                <img src="u1699.png" alt="" class="img-1" />
              </div>
              <span class="span-7">王琳</span>
              <span class="span-8">28岁</span>
              <span class="span-9">关系：夫妻</span>
            </div>
          </div>
        </div>
      </div>

      <div class="thy-33">
        <br />

        <div class="view-3">签约信息</div>

        <!-- <span class="span-2">居民编号：<span class="span-3"> {{obj.id}}</span></span> -->
        <span class="span-60"
          >签约编号：<span class="span-3"> {{ obj.record_id }}</span></span
        >
        <span class="span-666"
          >签约状态：<span class="span-3">
            {{ obj.conclude_state == 2 ? "生效中" : "已过期" }}</span
          ></span
        >
        <span class="span-60"
          >签约机构：<select
            name=""
            id=""
            v-model="obj.record_organization"
            style=""
            class="sex_select"
          >
            <option value="">请选择</option>
            <option value="1">罗西社区服务中心</option>
            <option value="2">天明社区服务中心</option>
            <option value="3">民进社区服务中心</option>
          </select></span
        >
        <span class="span-tuandui"
          >签约团队：<select
            name=""
            id=""
            v-model="obj.record_doctor_team"
            class="sex_select"
          >
            <option value="">请选择</option>
            <option value="1">李明明团队</option>
            <option value="2">王汉文团队</option>
            <option value="3">李民进团队</option>
          </select></span
        >

        <!-- <span class="span-2">居民编号：<span class="span-3"> {{obj.id}}</span></span> -->
        <span class="span-tuandui"
          >签约医生：<span class="span-3">
            {{ obj.contract_doctor }}</span
          ></span
        >
        <span class="span-tuanduis"
          >服务包：<select
            name=""
            class="sex_select"
            v-model="obj.record_server"
          >
            <option value="">请选择</option>
            <option value="1">基础包 ¥240</option>
            <option value="2">老年人基础包 ¥340</option>
            <option value="3">慢性病护理包 ¥340</option>
          </select></span
        >
        <span class="span-600"
          >签约周期：<span class="span-3">
            {{ obj.contract_period }}</span
          ></span
        >
        <span class="span-600"
          >费用：<span class="span-3"> {{ obj.cost }}</span></span
        >

        <!-- <span class="span-2">居民编号：<span class="span-3"> {{obj.id}}</span></span> -->
        <span class="span-6000"
          >签约类型：<span class="span-3">
            {{ obj.contract_type == 2 ? "已签约" : "首次签约" }}</span
          ></span
        >
        <span class="span-601"
          >申请时间：<span class="span-3">
            {{ obj.commencement_date }}</span
          ></span
        >
        <span class="span-601"
          >生效日期：<input
            type="text"
            class="input_sfz"
            v-model="obj.commencement_date"
        /></span>

        <div class="div_span">
          <span class="span-602">签约备注：<textarea
            v-model="obj.signeda_note"
            class="textarea_span"
          ></textarea></span
          >
        </div>
      </div>

      <div id="top_div">
        <el-row>
          <template>
            <el-button
              type="primary"
              :plain="true"
              round
              class="elt"
              @click="preservation"
              >保存</el-button
            >
            <el-button round class="elt" @click="returns">返回</el-button>
          </template>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      obj: {},
      ids: null,
    };
  },
  mounted() {
    this.ids = this.$route.query.idpp;
    this.$axios({
      url: "api/record/findRecordById",
      mounted: "GET",
      params: {
        record_id: this.ids,
      },
    }).then((res) => {
      console.log(res);
      this.obj = res.data;
    });
    this.name = this.msg;
    //  alert(this.ids)s
  },
  methods: {
    preservation() {
      this.$axios({
        url: "api/record/findRecordModify",
        mounted: "post",
        traditional: true,
        params: { ...this.obj },
      });
      console.log(this.obj);
      this.$message({
        message: "恭喜你，保存成功",
        type: "success",
      });
      this.$router.push({ path: "/pending" });
    },
    returns() {
      this.$router.push({ path: "/pending" });
    },
  },
};
</script>

<style scoped>
.span-address {
  float: left;
  /* width: 20%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 70px;
}
.input_address {
  left: 0px;
  top: 0px;
  width: 300px;
  height: 40px;
  background: inherit;
  /* background-color: rgba(242, 242, 242, 1); */
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(228, 228, 228, 1);
  border-radius: 4px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  /* font-family: "PingFangSC-Regular", "PingFang SC"; */
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  text-align: left;
  padding-left: 20px;
}
.sex_select {
  font-size: 18px;
  border-width: 0px;
  /* position: absolute; */
  left: 0px;
  top: 0px;
  width: 200px;
  height: 40px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(228, 228, 228, 1);
  border-radius: 4px;
  /* -moz-box-shadow: none;
  -webkit-box-shadow: none; */
  box-shadow: none;
  font-size: 12px;
  padding-left: 15px;
  text-align: left;
}
.sex_select2 {
  font-size: 18px;
  margin-left: -5px;
  border-width: 0px;
  /* position: absolute; */
  left: 0px;
  top: 0px;
  width: 200px;
  height: 40px;
  background: inherit;
  background-color: rgba(255, 255, 255, 1);
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(228, 228, 228, 1);
  border-radius: 4px;
  /* -moz-box-shadow: none;
  -webkit-box-shadow: none; */
  box-shadow: none;
  font-size: 12px;
  padding-left: 15px;
  text-align: left;
}
.input_sfz {
  left: 0px;
  top: 0px;
  width: 200px;
  height: 40px;
  background: inherit;
  /* background-color: rgba(242, 242, 242, 1); */
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(228, 228, 228, 1);
  border-radius: 4px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  /* font-family: "PingFangSC-Regular", "PingFang SC"; */
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  text-align: left;
  padding-left: 20px;
}
.xinghao {
  color: red;
}
#input_name {
  left: 0px;
  top: 0px;
  width: 200px;
  height: 40px;
  background: inherit;
  background-color: rgba(242, 242, 242, 1);
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(228, 228, 228, 1);
  border-radius: 4px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  /* font-family: "PingFangSC-Regular", "PingFang SC"; */
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  text-align: left;
  padding-left: 20px;
}
.span-60 {
  margin-left: 20px;
  margin-right: 120px;
  float: left;
  height: 100px;
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-602 {
  margin-left: 4px;
  /* margin-right: 500px; */
  float: left;
  height: 500px;
  line-height: 80px;
  height: 200px;
  font-size: 85%;
  align-content: center;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.textarea_span{
  color: rgb(125, 112, 112);
  float: left;
  font-size: 85%;
    left: 0px;
    top: 0px;
    width: 582px;
    height: 120px;
    background-image: inherit;
    background-position: inherit;
    background-size: inherit;
    background-repeat: inherit;
    background-attachment: inherit;
    background-origin: inherit;
    background-clip: inherit;
    background-color: rgba(255, 255, 255, 0.02);
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(228, 228, 228);
    border-radius: 4px;
    box-shadow: none;
    font-size: 15px;
     padding-top: 20px;
     padding-left: 20px;
    /* text-align: left; */
}
.div_span {
   margin-left: 20px;
  margin-right: 500px;
  float: left;
  /* height: 100px; */
  line-height: 80px;
  font-size: 85%;
  align-content: center;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-600 {
  margin-left: 20px;
  margin-right: 265px;
  float: left;
  height: 100px;
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-6000 {
  margin-left: -32px;
  margin-right: 170px;
  float: left;
  height: 100px;
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-601 {
  margin-left: 20px;
  margin-right: 121px;
  float: left;
  height: 100px;
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-tuanduis {
  margin-left: 168px;
  margin-right: 73px;
  /* margin-right: 120px; */
  float: left;
  height: 60px;
  line-height: 20px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-tuandui {
  margin-left: 20px;
  margin-right: 73px;
  /* margin-right: 120px; */
  float: left;
  height: 60px;
  line-height: 20px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  /* margin-left: 50px; */
}
.span-40 {
  float: left;
  /* width: 30%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 60px;
  /* margin-top: 10px; */
  background-color: #fff;
}
.span-666 {
  margin-right: 190px;
  float: left;
  /* width: 20%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 80px;
}
.span-6 {
  float: left;
  /* width: 20%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 80px;
}
.span-age {
  float: left;
  /* width: 20%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 60px;
}
.elt {
  width: 140px;
  height: 60px;
}
#view-5 {
  width: 100%;
  float: left;
  height: 50px;
}
#view-1 {
  width: 90%;
  float: left;
  margin-left: 5%;
  margin-top: 30px;
  background-color: #fff;
}

.img-3 {
  width: 30px;
  height: 30px;
}
#butt-1 {
  float: left;
  margin: 50px 30px;
  width: 200px;
  height: 50px;
  color: #fff;
  background-color: #1877f2;
  border: 1px solid #1877f2;
}
#butt-2 {
  float: left;
  margin: 50px 30px;
  width: 100px;
  height: 50px;
}
.thy-6 {
  width: 100%;
  height: 200px;
  float: left;
}
.img-1 {
  width: 100%;
  height: 100%;
}
.span-7 {
  float: left;
  font-size: 13;
  width: 46px;
  /* margin-left: 30px;
  margin-top: 30px; */
  margin-top: 10px;
}
.span-8 {
  float: left;
  /* margin-top: 38px; */
  color: rgb(125, 112, 112);
  font-size: 90%;
  margin-top: 10px;
}
.span-9 {
  float: left;
  margin-left: 3px;
  margin-top: 10px;
  color: rgb(125, 112, 112);
  font-size: 90%;
}
.thy-5 {
  width: 30%;
  height: 35px;
  float: left;
  /* background-color: red; */
  margin: 25px 10px;
}
.thy-4 {
  border-radius: 8px;
  width: 200px;
  height: 80px;
  margin: 0px 10px;
  float: left;
  /* border: 1px solid rgb(141, 128, 128); */
  border-width: 1px;
  border-style: solid;
  border-color: rgb(242, 242, 242);
  background-color: rgb(255, 255, 255);
}
.thy-3 {
  width: 98%;
  float: left;
  margin-left: 1%;
  margin-top: 20px;
  margin-bottom: 20px;
}
.thy-man {
  width: 65px;
  height: 50px;
  margin-left: 20px;
  float: left;
}
.thy-34 {
  width: 98%;
  /* height: 320px;  */
  background-color: #ffffff;
  float: left;
  margin-left: 1%;
  border-bottom: 1px solid #daa618;
}
.thy-33 {
  width: 98%;
  height: 670px;
  /* background-color: yellow; */
  float: left;
  margin-left: 1%;
  /* border-bottom: 1px solid #f2f7fb; */
  border-bottom: 1px solid #daa618;
}
.span-3 {
  color: rgb(86, 76, 76);
  font-size: 120%;
}
.span-33 {
  color: black;
  font-size: 120%;
  background-color: #f3eaec;
  border-radius: 7px;
  padding: 2px 4px;
  color: #fa746b;
  font-size: 14px;
}
.span-34 {
  color: black;
  font-size: 120%;
  background-color: #f3f4ee;
  border-radius: 7px;
  padding: 2px 4px;
  color: #fbdd78;
  font-size: 14px;
}
.span-4 {
  float: left;
  /* width: 30%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 40px;
  /* margin-top: 10px; */
}

.span-5 {
  float: left;
  /* width: 23%; */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 34px;
  /* margin-top: 10px; */
}

.span-2 {
  float: left;
  /* width: 18%;   */
  line-height: 80px;
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 40px;
  /* margin-top: 10px; */
}
.view-1 {
  width: 100%;
  float: left;
}
.thy-2 {
  width: 100%;
  /* height: 50px; */
  float: left;
  /* margin-top: 10px; */
  /* background-color: red; */
}
.thy-20 {
  width: 100%;
  /* height: 50px; */
  float: left;
  /* margin-top: 10px; */
  /* background-color: red; */
}
.span-1 {
  /* font-size: 85%;
  color: rgb(125, 112, 11);
  margin-top: 10px;
  float: left;
  font-size: 130%;
  width: 100%; */
  /* line-height: 80px; */
  font-size: 85%;
  color: rgb(125, 112, 112);
  margin-left: 0px;
}

* {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}
.jk_span {
  font-size: 18px;
  font-weight: 550;
  margin-top: 20px;
  float: left;
}
.jk_span div {
  width: 10px;
  height: 30px;
  background-color: #1877f2;
  -webkit-border-radius: 5px;
  /* margin-left: 40px; */
  /* margin-top: 27px; */
  margin-right: 10px;
  float: left;
}
.view-3 {
  float: left;
  width: 100%;
  margin-top: 20px;
  margin-left: 20px;
}
#big {
  width: 87%;
  height: 100%;
  float: right;
  background-color: #f2f7fb;
  margin: 80px auto;
}

#bigBox {
  align-content: center;
  width: 90%;
  height: 1000px;
  background-color: #ffffff;
  margin: 30px auto;
}

#top_div {
  padding-top: 20px;
  width: 100%;
  height: 100px;
  /* background-color: #ffffff; */
  float: left;
  margin-top: 30px;
}

.jk_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #1877f2;
  font-size: 15px;
  color: #ffffff;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 120px;
}
.jks_btn {
  padding: 6px 19px;
  border: 1px solid #f6f9fc;
  background-color: #f6f9fc;
  font-size: 15px;
  color: #1877f2;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 120px;
}
.jm_div {
  float: left;
}
.j2m_div {
  float: right;
}
.jmid_span {
  font-size: 13px;
  color: #cccccc;
}
.nr_span {
  font-size: 13px;
  padding-right: 50px;
}
.my_sp1 {
  background-color: #f3eaec;
  border-radius: 7px;
  padding: 2px 4px;
  color: #fa746b;
  font-size: 14px;
}

.my_sp3 {
  background-color: #f3f4ee;
  border-radius: 7px;
  padding: 2px 4px;
  color: #fbdd78;
  font-size: 14px;
}

/* .my_p {
    margin-top: 5px;
} */
.img_div {
  width: 200px;
  height: 84px;
  border-style: solid solid solid solid;
  border-color: #f0f5f8;
  border-radius: 15px;
  float: left;
  margin-left: 16px;
}

.my_img {
  margin-top: 19px;
  margin-left: 19px;
  border-color: #f0f5f8;
  border-width: 3px;
  float: left;
}
.my_img1 {
  margin-top: 19px;
  margin-left: 1px;
  border-color: #f0f5f8;
  border-width: 3px;
  float: left;
}
.p_left {
  float: left;
  margin-top: 13px;
  margin-left: 3px;
}
.jmid1_span {
  font-size: 13px;
  color: #cccccc;
}
.nr1_span {
  font-size: 16px;
}
.jmid2_span {
  font-size: 13px;
  color: #cccccc;
}
.jmid3_span {
  font-size: 14px;
  color: #cccccc;
}
.nr2_span {
  font-size: 13px;
  color: #cccccc;
}
.jks2_btn {
  padding: 6px 19px;
  border: 1px solid #ffffff;
  background-color: #ffffff;
  font-size: 15px;
  color: #8f3333;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 72px;
  border-style: solid solid solid solid;
  border-color: #f0f5f8;
  border-width: 2px;
}
.jk1_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #1877f2;
  margin-right: 10px;
  font-size: 15px;
  color: #ffffff;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 150px;
}
.inp_div {
  float: left;
}
#input_id {
  width: 200px;
  height: 36px;
  border-radius: 7px;
  border-style: solid solid solid solid;
  border-color: #f0f5f8;
  border-width: 2px;
}
.select_qy {
  width: 200px;
  height: 43px;
  border-radius: 7px;
  border-style: solid solid solid solid;
  border-color: #f0f5f8;
  border-width: 2px;
}
.red_span {
  color: red;
}
.bcun_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #1877f2;
  font-size: 15px;
  color: #ffffff;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 70px;
}
.ws_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #1877f2;
  font-size: 15px;
  color: #ffffff;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 140px;
}
.qy_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #3dd4a7;
  font-size: 15px;
  color: #fff8dd;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 100px;
}
.fh_btn {
  padding: 6px 19px;
  border: 1px solid #28d094;
  background-color: #ffffff;
  font-size: 15px;
  color: #33336e;
  line-height: 33px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  width: 70px;
}
#a_href {
  font-size: 13px;
  color: #29a5fb;
}

#bigBoxTwo {
  align-content: center;
  width: 90%;
  height: 380px;
  background-color: #ffffff;
  margin: 30px auto;
}
</style>